package com.dragon.app.java8;

import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamAPI {

	public static void main(String[] args) {
		
		
		List<String> list = new ArrayList<String>();
		list.add("asdfj");
		list.add("gsfhgh563563");
		list.add("jyujxgfx5463");
		list.add("阿道夫噶告诉他怀疑他");
		
		Stream<String> stream = list.stream();
		stream.filter(str -> str.contains("f")).forEach(System.out::println);

		System.out.println("===============");

		Object[] array = list.toArray();
		Stream<Object> stream2 = Arrays.stream(array);
		stream2.skip(2).forEach(System.out::println);
		
		System.out.println("===============");
		
		List<String> asList = Arrays.asList("gsdf","ert","345","s是否会","内容4378");
		asList.stream().sorted().forEach(System.out::println);

		Collectors.toList();


		URL url;




		

	}

}
